begintownscript;

variables;

int i,j,k,choice;

body;

beginstate INIT_STATE;
set_crime_tolerance (15);
break;

beginstate EXIT_STATE;
break;
beginstate START_STATE;
//If party attaacks or steals!
if (get_crime_level() >= 1)
	{kill_char(1000,2,0);
	message_dialog("The poor refugees here are already suspicious of you.","When you step out of bounds, the last thing you remember is a sharp chill running through your body, and then you die! THE END"); }
break;

beginstate 59;
reset_dialog();
add_dialog_str(0,"The Portal is fluctuating wildly. Even your skills can't change that. If you step through it - you might never get help. Do you really wish to attempt it?",0);
add_dialog_choice(0,"No");
add_dialog_choice(1,"Yes");
choice = run_dialog(1);
if (choice == 1)
end();
if (choice == 2)
set_state_continue(60);
break;

beginstate 60;
reset_dialog();
add_dialog_str(0,"You crawl slowly into the Portal, and find yourselves in the middle of a remote Wilderness. It takes you nearly two years to return to civilisation.",0);
add_dialog_str(1,"By then your warning is too late to help, and the Undead have been beaten back, but at great cost to the Empire. Millions are dead and dying,",0);
add_dialog_str(2,"all because you were too cowardly to help the poor people of the Valley. You are now infamous wimps!",0);
	add_dialog_choice(0,"The end!");
	run_dialog(0);
	end_scenario(0);
	break;
	
beginstate 15;
if (get_flag(25,10) == 0){
message_dialog("You walk up to the Cave's Portal. Sure enough, the power is offline. However, you think you can fix that.","You swiftly get out some of your adventuring tools, and, with your tool use, you manage to Jury-Rig the Portal. How long that will last for, you cannot say.");
set_flag(25,10,1);	}
break;

beginstate 17;
if (get_flag(81,4) < 1) 
message_dialog("You awake to the sounds of combat. The cave has obviously been attacked.","A villager runs up to you and shouts _Arm yourselves and help!_ You do so quickly, and head towards the trouble."); 
set_flag(81,4,1);
break;